//
//  GGCollectionViewCell.m
//  tantan
//
//  Created by SQHH on 2017/12/20.
//  Copyright © 2017年 SQHH. All rights reserved.
//

#import "GGCollectionViewCell.h"

@interface GGCollectionViewCell () <
UITableViewDataSource,
UITableViewDelegate,
UITextViewDelegate,
UICollectionViewDelegateFlowLayout,
UICollectionViewDataSource,
UICollectionViewDelegate,
UIScrollViewDelegate
>

/// fgsfdg数据源
@property (nonatomic, strong) NSMutableArray *data;

/// gawrg
@property (nonatomic, strong) UITableView *fgsfdg;

/// fwe
@property (nonatomic, strong) UITextView *fadsfdas;

/// fdsafCollectionViewLayout
@property (nonatomic, strong) UICollectionViewFlowLayout *collectionViewFlowLayout;

/// dsafadsf
@property (nonatomic, strong) UICollectionView *fdsaf;

/// fsadfasd
@property (nonatomic, strong) UIScrollView *fdsafasd;

@end

@implementation GGCollectionViewCell

#pragma mark - # Delegate
//MARK: UITableViewDataSource
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
	return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
	return self.data.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
	return nil;
}

//MARK: UITableViewDelegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
	
}

//MARK: UICollectionViewDataSource
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView {
	return 0;
}

- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
	return 0;
}

- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
	return nil;
}

//MARK: UICollectionViewDelegate
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
	
}

//MARK: UIScrollViewDelegate
- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
	
}

- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView {
	
}

- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate {
	
}

- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView {
	
}

- (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView {
	
}

- (id)initWithFrame:(CGRect)frame {
	if (self = [super initWithFrame:frame]) {
		[self.contentView addSubview:self.fgsfdg];
		[self.contentView addSubview:self.fadsfdas];
		[self.contentView addSubview:self.fdsaf];
		[self.contentView addSubview:self.fdsafasd];
	}
	return self;
}

#pragma mark - # Getter
- (NSMutableArray *)data {
	if (!_data) {
		_data = [[NSMutableArray alloc] init];
	}
	return _data;
}

- (UITableView *)fgsfdg {
	if (!_fgsfdg) {
		_fgsfdg = [[UITableView alloc] init];
		[_fgsfdg setDelegate:self];
		[_fgsfdg setRowHeight:45];
		[_fgsfdg setSectionHeaderHeight:12];
		[_fgsfdg setSectionFooterHeight:7];
		[_fgsfdg setDataSource:self];
	}
	return _fgsfdg;
}

- (UITextView *)fadsfdas {
	if (!_fadsfdas) {
		_fadsfdas = [[UITextView alloc] init];
		[_fadsfdas setDelegate:self];
		[_fadsfdas setText:@"fqrwfsadga"];
		[_fadsfdas setFont:[UIFont 23]];
		[_fadsfdas setTextColor:[UIColor blackColor]];
	}
	return _fadsfdas;
}

- (UICollectionViewFlowLayout *)collectionViewFlowLayout {
	if (!_collectionViewFlowLayout) {
		_collectionViewFlowLayout = [[UICollectionViewFlowLayout alloc] init];
		[_collectionViewFlowLayout setMinimumLineSpacing:0];
		[_collectionViewFlowLayout setMinimumInteritemSpacing:0];
		[_collectionViewFlowLayout setItemSize:CGSizeMake(0, 0)];
		[_collectionViewFlowLayout setHeaderReferenceSize:CGSizeMake(0, 0)];
		[_collectionViewFlowLayout setFooterReferenceSize:CGSizeMake(0, 0)];
		[_collectionViewFlowLayout setSectionInset:UIEdgeInsetsMake(0, 0, 0, 0)];
	}
	return _collectionViewFlowLayout;
}

- (UICollectionView *)fdsaf {
	if (!_fdsaf) {
		_fdsaf = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:self.collectionViewFlowLayout];
		[_fdsaf setBackgroundColor:[UIColor whiteColor]];
		[_fdsaf setDelegate:self];
		[_fdsaf setDataSource:self];
	}
	return _fdsaf;
}

- (UIScrollView *)fdsafasd {
	if (!_fdsafasd) {
		_fdsafasd = [[UIScrollView alloc] init];
		[_fdsafasd setDelegate:self];
	}
	return _fdsafasd;
}

@end
